package com.zdkj.subway.st.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.zdkj.common.core.exceltools.HeaderToColumn;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Tolerate;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @ProjectName: zdkj
 * @Package: com.zdkj.subway.st.entity
 * @ClassName: SwStOutputDetail
 * @Description:
 * @Author: kangjian
 * @CreateDate: 2020/1/10 16:52
 * @Version: 1.0
 */
@Data
@TableName("sw_tk_output_detail")
@ApiModel(value = "车票出库记录")
@Builder(toBuilder = true)
@EqualsAndHashCode(callSuper = true)
public class SwStOutputDetail extends Model<SwStOutputDetail> {
    @TableId(type = IdType.AUTO)
    @ApiModelProperty(value = "唯一标识")
    private Integer id;

    @ApiModelProperty(value = "出库类型")
    @HeaderToColumn(header = "出库类型",index = 1)
    private String outGoingType;

    @ApiModelProperty(value = "出库单流水号")
    @HeaderToColumn(header = "出库单流水号",index = 2)
    private String outstockno;

    @ApiModelProperty(value = "库存日盘点表ID")
    private Integer stockdayid;

    @ApiModelProperty(value = "库存分区")
    @HeaderToColumn(header = "库存分区",index = 3)
    private String stockArea;

    @ApiModelProperty(value = "出库时间")
    @HeaderToColumn(header = "出库时间",index = 4)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime outGoingTime;

    @ApiModelProperty(value = "车票名称")
    @HeaderToColumn(header = "车票名称",index = 5)
    private String ticketName;

    @ApiModelProperty(value = "票种")
    @HeaderToColumn(header = "票种",index = 6)
    private String ticketType;


//    @ApiModelProperty(value = "票区")
//    @HeaderToColumn(header = "票区",index = 3)
//    private String ticketArea;

    @ApiModelProperty(value = "车票次数")
    private Integer ticketTimes;

    @ApiModelProperty(value="车票金额")
    private BigDecimal ticketPrice;

    @ApiModelProperty(value = "数量")
    private Integer ticketNumber;

    @ApiModelProperty(value = "车票有效期")
    private String activeTime;

    @ApiModelProperty(value = "车票最晚启动日期")
    private LocalDateTime latestStartTime;

    @ApiModelProperty(value = "票卡卡号")
    private String ticketNo;

    @ApiModelProperty(value = "是否接收")
    private String isreceive;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "入库人")
    private String keepercode;

    @ApiModelProperty(value = "入库人名称")
    private String keepername;

    @ApiModelProperty(value = "库管员1")
    private String keeper1code;

    @ApiModelProperty(value = "库管员1名称")
    private String keeper1name;

    @ApiModelProperty(value = "库管员2")
    private String keeper2code;

    @ApiModelProperty(value = "库管员2名称")
    private String keeper2name;

    @ApiModelProperty(value = "创建人ID")
    private Integer creatorId;

    @ApiModelProperty(value = "创建人名称")
    private String creatorName;

    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "附件地址")
    private String filePath;

    @ApiModelProperty(value = "图片地址")
    private String picturePath;

    @ApiModelProperty(value = "入库审批状态")
    private String checkApproveStatus;

    @Tolerate
    public SwStOutputDetail() {}
    /**
     * 用于前端传开始结束日期
     */
    @TableField(exist = false)
    @ExcelIgnore
    private List<String> dates1;
    /**
     * 数据来源 0：日计划  1：无效票
     */
    @ApiModelProperty(value="数据来源 0：日计划  1：无效票")
    private String dataSource;
}
